import { LOGIN } from '../constants'

const initValue = {
  token: '',
}
//登陆操作
export default function login(state = initValue, action) {
  //退出
  //登录
  if (action.type === LOGIN) {
    return {
      ...state,
      token: action.token,
    }
  }
  return state
}
